﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class UserControls_LinkMore : UCBase
{
    public UserControls_LinkMore()
    {
        Name = "友情链接列表";
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Session["CurrentPage"] = null;
        }
        LoadData();
    }

    private void LoadData()
    {
        long ShopID = _Site.ID;
        this.Page1.FindType = 0;
        this.Page1.Field1 = "";
        this.Page1.Field2 = "";
        this.Page1.Like1 = "";
        this.Page1.Like2 = "";
        Page1.DataListID = dlLink;
        Page1.TableName = "tbl_Links";
        Page1.Condition = "where ShopID=" + ShopID + "";
    }
    protected void dlLink_ItemDataBound(object sender, DataListItemEventArgs e)
    {
        if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
        {
            Image img = (Image)e.Item.FindControl("ImgGood");
            img.ImageUrl = "~/UpLoad/Images/Links/" + img.ImageUrl;
        }
    }
}
